<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('yp','center_header'); ?>
<div id="main">
<?php include template("yp","center_left"); ?>
<?php if($action=='add') { ?>
<div id="right">

<form action="<?php echo URL;?>" method="post" name="myform"  enctype="multipart/form-data" >
<table cellpadding="0" cellspacing="1" class="table_form">
<caption>发布招聘</caption>
    <?php if(is_array($forminfos)) foreach($forminfos AS $field => $info) { ?>
<tr> 
      <th width="20%"> <?php if($info['star']) { ?> <font color="red">*</font><?php } ?> <strong><?php echo $info['name'];?></strong><br />
  <?php echo $info['tips'];?>
  </th>
      <td><?php echo $info['form'];?> </td>
    </tr>
<?php } ?>
    <tr> 
      <td></td>
      <td> 
  <input type="hidden" name="forward" value="?file=job&action=add"> 
  <input type="submit" name="dosubmit" value=" 立刻发布 "> 
  </td>
    </tr>
</table>
</form>
</div>
<?php } elseif ($action=='edit') { ?>
<div id="right">
<form action="<?php echo URL;?>" method="post" name="myform"  enctype="multipart/form-data" >
<table cellpadding="0" cellspacing="1" class="table_form">
<caption>修改招聘</caption>
    <?php if(is_array($forminfos)) foreach($forminfos AS $field => $info) { ?>
<tr> 
      <th width="20%"> <?php if($info['star']) { ?> <font color="red">*</font><?php } ?> <strong><?php echo $info['name'];?></strong><br />
  <?php echo $info['tips'];?>
  </th>
      <td><?php echo $info['form'];?> </td>
    </tr>
<?php } ?>
    <tr> 
      <td></td>
      <td> 
  <input type="hidden" name="forward" value="<?php echo $forward;?>"> 
  <input type="submit" name="dosubmit" value=" 确定修改 "> 
  </td>
    </tr>
</table>
</form>
</div>
<?php } else { ?>
  <div id="right">
<div class="clear"></div>
<table cellpadding="0" cellspacing="1" class="table_list">
  <caption>管理招聘</caption>
  <tr>
<th>职位名称</th>
<th width="50">性别要求</th>
<th width="100">招聘人数</th>
<th width="110">发布时间</th>
<th width="50">操作</th>
  </tr>
<?php if(is_array($infos)) foreach($infos AS $info) { ?>
<tr>
<td class="align_left">
<?php if($info['reward']) { ?><span style="color:orange;"><img src="images/icon_credit.gif" width="12" height="11"><?php echo $info['reward'];?> </span><?php } ?>
<a href="<?php echo show_url('job',$info[id]);?>" target="_blank" title="<?php echo $info['title'];?>"><?php echo str_cut($info[title], 72, '..');?></a> 
</td>

<td><?php echo $info['sex'];?></td>
<td><?php echo $info['employ'];?></td>
<td><?php echo date('Y-m-d H:i',$info[inputtime]);?></td>
<td><a href="<?php echo BUSINESSDIR;?>?file=<?php echo $file;?>&action=edit&id=<?php echo $info['id'];?>"><img src="yp/images/edit.gif" alt="编辑"></a> <a href="javascript:confirmurl('<?php echo BUSINESSDIR;?>?file=<?php echo $file;?>&action=delete&id=<?php echo $info['id'];?>','确认删除此信息吗？')"><img src="yp/images/delete.gif" alt="删除"></a></td>
</tr>
<?php } ?>
</table>
<div id="pages"><?php echo $pages;?></div>
<table cellpadding="0" cellspacing="1" class="table_info">
  <caption>
  提示信息
  </caption>
  <tr>
<td> 招聘删除后不可恢复
<br/>
</td>
  </tr>
</table>
  </div>
<?php } ?>
</div>
<div class="clear"></div>
<?php include template('phpcms','footer'); ?>
<SCRIPT LANGUAGE="JavaScript">
<!--
$().ready(function() {
  $('form').checkForm(1);
});
//-->
</SCRIPT>
<script type="text/javascript" src="images/js/form.js"></script>
<script type="text/javascript" src="images/js/validator.js"></script>
<script type="text/javascript" src="yp/images/js/info_add.js"></script>